package com.api.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import com.api.interceptor.BaseInterceptor;
import com.api.interceptor.LoginInterceptor;
@Configuration
public class BaseInterceptorConfig extends WebMvcConfigurerAdapter {
	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(new BaseInterceptor()).addPathPatterns("/**");
		registry.addInterceptor(new LoginInterceptor()).excludePathPatterns("/user/login","/user/register","/user/doLogin","/user/doRegister","/user/logout");
	}

}
